package Thread.ThreadSafe;
/*
* 多线程安全问题:
*   模拟买票案例
* */
public class TicketText {
    public static void main(String[] args) {
//        创建Runnable的实现类对象
        RunnableImpl run = new RunnableImpl();
//        创建Thread对象，构造方法传递Runnable实现类的对象
        Thread t0 = new Thread(run);
        Thread t1 = new Thread(run);
        Thread t2 = new Thread(run);

//        调用start方法开启多线程
        t0.start();
        t1.start();
        t2.start();
    }

}
